﻿using System;
using System.Collections.Generic;
using System.Text;
using Dotnet.TopApi.Request.WesafeDataAPIService;
using Dotnet.TopApi.Response;

namespace Dotnet.TopApi.Request
{

    public class DatahanderInsertRequest : WesafeDataAPIServiceRequestBase<DatahanderInsertResponse, InsertEntity, InsertParamsConfig>
    {
        public DatahanderInsertRequest()
        {
            base.Entitys.Add(new InsertEntity()
            {
                id = "10000187",
                Name = "test081117887",
                AreaIds = "123456",
                Status = 1,
                TourType = 1,
                Period = 1,
                StartTime = "2020-08-28 16:18:13",
                EndTime = "2020-08-28 16:18:13",
                IsNormal = false,
                CreationTime = "2020-08-28 16:18:13"
            });
            base.Entitys.Add(new InsertEntity()
            {
                id = "10000187",
                Name = "test081117887",
                AreaIds = "123456",
                Status = 1,
                TourType = 1,
                Period = 1,
                StartTime = "2020-08-28 16:18:13",
                EndTime = "2020-08-28 16:18:13",
                IsNormal = false,
                CreationTime = "2020-08-28 16:18:13"
            });

            base.HanderConfig.workName = "1111";
            base.HanderConfig.handerName = "insert";
            base.HanderConfig.dataEngine = "mysql";
            base.HanderConfig.tableName = "tourtask";
            base.HanderConfig.indexName = "analysis_firedepartment";

            base.ParamsConfig.Id = "1";
        }
        public override string GetApiName()
        {
            return "api/v1/insert";
        }
    }
    public class InsertEntity
    {
        public string id { get; set; }
        public string Name { get; set; }
        public string AreaIds { get; set; }
        public int? Status { get; set; }
        public int? TourType { get; set; }
        public int? Period { get; set; }
        public string StartTime { get; set; }
        public string EndTime { get; set; }
        public bool? IsNormal { get; set; }
        public string CreationTime { get; set; }
    }
    public class InsertParamsConfig
    {
        public string Id { get; set; }
    }
}
